package com.hospital.doctor.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hospital.doctor.domain.Communication;
import com.hospital.doctor.domain.ConsultRecordInfo;
import com.hospital.doctor.mapper.EltCommunicationMapper;
import com.hospital.doctor.service.EltCommunicationService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author：zhuzhujiang
 * @Description:
 * @name：EltCommunicationServiceImpl
 * @Date：2024/10/20 16:49
 */
@Service
public class EltCommunicationServiceImpl extends ServiceImpl<EltCommunicationMapper, Communication> implements EltCommunicationService {


    @Autowired
    private EltCommunicationMapper eltCommunicationMapper;

    @Override
    public List<Communication> getCommunicationHistory(Long consultId) {

        List<Communication> list = this.list(new QueryWrapper<Communication>().lambda()
                .eq(Communication::getId, consultId)
                .orderByAsc(Communication::getDate));

        return list;
    }


}
